<extend name="_layout/main"/>
<block name="content">
    <div class="page-content">
        <div class="page-breadcrumbs">
            <ul class="breadcrumb">
                <li>
                    <i class="fa fa-home"></i>
                    <a href="{:U('dashboard/index')}">系统首页</a>
                </li>
                <li class="active">商品订单详情</li>
            </ul>
        </div>

        <div class="page-body">
            <div class="row">
                <div class="col-xs-12 col-md-12">
                    <div class="widget">
                        <table class="table table-hover" id="searchable">
                            <thead class=" ">
                            <tr role="row">
                                <th class="text-center">订单号</th>
                                <th>会员</th>
                                <th class="text-center">订单金额</th>
                                <th class="text-center">下单时间</th>
                                <th class="text-center">状态</th>
                                <th class="text-center">备注</th>
                                <th class="text-center"></th>
                            </tr>
                            </thead>

                            <tbody>
                            <tr>
                                <td class="text-center">{$order.order_id}</td>
                                <td>{$order.nickname}</td>
                                <td class="text-center">【现金{$order.order_balance}】 【积分{$order.order_integral}】
                                    【商品券{$order.order_coupon}】
                                </td>

                                <td class="text-center">{$order.created_at|format_time}</td>
                                <td class="text-center">
                                    {:orderStatus($order['order_status'])}
                                </td>
                                <td class="text-center">
                                    <egt name="order.order_status" value="1">
                                        支付：{$order.payed_at|format_time}
                                    </egt>
                                    <egt name="order.order_status" value="2">
                                        发货：{$order.express_at|format_time}
                                        快递单号:{$order.express_code}
                                    </egt>
                                </td>
                                <td class="text-center">
                                    <eq name="order.order_status" value="1">
                                    <a class="btn btn-success ajax-load" href="{:U('send_package',['id'=>$order['id']])}">确认发货 <i class="fa fa-check right"></i></a>
                                    <else />
                                        <a href="javascript:void(0);" class="btn btn-sky">{:orderStatus($order['order_status'])}</a>
                                    </eq>

                                    <!--<a class="btn btn-danger" href="javascript:void(0);" data-confirm="确认取消该订单吗？"><i class="fa fa-times"></i> 取消订单</a>-->
                                </td>
                            </tr>
                            </tbody>
                        </table>
                        <table class="table table-hover" id="searchable_2">
                            <thead class=" ">
                            <tr role="row">
                                <th class="text-center" width="160"></th>
                                <th>商品</th>
                                <th class="text-center">数量</th>
                                <th class="text-center">支付现金</th>
                                <th class="text-center">支付积分</th>
                                <th class="text-center">支付商品券</th>
                            </tr>
                            </thead>

                            <tbody>
                            <volist name="order.goods" id="item">
                            <tr>
                                <td class="text-center"><img src="{$item.goods_thumb}" style="max-width: 150px; max-height: 120px;" /></td>
                                <td>{$item.goods_name}</td>
                                <td class="text-center">{$item.goods_number}</td>
                                <td class="text-center">{:sprintf('%.2f',$item['goods_price_balance'] * $item['goods_number'])} ({$item['goods_price_balance']} X {$item['goods_number']})</td>
                                <td class="text-center">{$item['goods_price_integral'] * $item['goods_number']} ({$item['goods_price_integral']} X {$item['goods_number']})</td>
                                <td class="text-center">{$item['goods_price_coupon'] * $item['goods_number']} ({$item['goods_price_coupon']} X {$item['goods_number']})</td>
                            </tr>
                            </volist>
                            </tbody>
                        </table>

                    </div>
                </div>
            </div>

        </div>
        <!-- /Page Body -->
    </div>
</block>
<block name="footer">

</block>